Skip to content

Recover corrected carved suffixes with successor lineage - #64

Merged
shaug merged 1 commit into
mainfrom
scott/63-successor-suffix-recovery
Jul 27, 2026
Merged

Recover corrected carved suffixes with successor lineage#64
shaug merged 1 commit into
mainfrom
scott/63-successor-suffix-recovery

Conversation

@shaug

@shaug shaug commented Jul 27, 2026

Copy link
Copy Markdown
Owner

TL;DR

Adds a live-reconstructible successor-source protocol that safely restamps only an owned, unmerged carved suffix after an accepted post-publication fix.

Summary

This PR closes the recovery dead end between babysit-pr candidate fixes and carve-changesets whole-chain equivalence. It adds:

  • versioned source-lineage metadata on commits and PRs;
  • a dry-run-first recover-suffix command with explicit authority, same-repository ownership checks, and exact remote leases;
  • preservation of merged prefix history, stable changeset positions, existing branches, and existing PR identities;
  • live resume for an interrupted branch-push/PR-metadata transition;
  • final base-plus-suffix equivalence against the immutable successor source; and
  • fresh evidence invalidation and exclusive handback rules for review-code-change and babysit-pr.

Ordinary v1 chains remain valid without migration. Recovery requires every lineage source at its exact SHA on the selected remote so a fresh clone can reconstruct the published chain.

Safety model

Recovery fails closed on mutable or unavailable sources, missing or discontinuous lineage, conflicting provenance, merged-prefix changes, unowned or forked PRs, unexpected branch advancement, lease races, and successor-tree mismatch. It never rewrites main, a merged changeset, or an immutable source.

Tickets

Fixes #63

## Summary
- Add immutable successor-source lineage and live v2 metadata reconstruction
- Add exact-lease recovery for only the owned unmerged suffix of a published chain
- Add regression tests, evaluator cases, and normative handoff documentation

## Why
- Let accepted post-publication fixes rejoin a carved chain after an earlier prefix merges
- Preserve source immutability, merged history, stable positions, ownership, and whole-chain equivalence

Fixes #63
@shaug
shaug merged commit 2687dd1 into main Jul 27, 2026
1 check passed
@shaug
shaug deleted the scott/63-successor-suffix-recovery branch July 27, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recover corrected carved suffixes with successor-source lineage

1 participant